function PrintTable(table, name, count)
    name = name or 'Table'
    count = count or 1
    local space = ''
    local separator = ' : '
    local first = '{'
    local last = '}'

    for i = 1, count do
        space = space .. '  '
    end
    print(space .. name .. separator .. first)
    for key, val in pairs(table) do
        if (type(val) == 'table') then
            PrintTable(val, key, count + 1)
        else
            print(space .. space .. tostring(key) .. separator .. tostring(val))
        end
    end
    print(space .. last)
end
function TuiOnLoad(tui)
    for key, _ in pairs(tui.Events) do
        tui:RegisterEvent(key)
    end
    tui:SetScript('OnEvent', function(self, event, ...)
        self.Events[event](self, ...)
    end)
end
function TuiOnLoads(...)
    for _, Tui in pairs({...}) do
        TuiOnLoad(Tui)
    end
end
function FunReturnToTable(...)
    if select('#', ...) ~= 0 then
        return {...}
    else
        return nil
    end
end
